package com.football.springboot.service.impl;


import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.football.springboot.entity.GameData;
import com.football.springboot.mapper.GameDataMapper;
import com.football.springboot.service.IGameDataService;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class GameDataServiceImpl extends ServiceImpl<GameDataMapper, GameData> implements IGameDataService {
    @Override
    public Map<String, Object> getgamehomedatamap(Map<String, Object> map, GameData gameData) {
        map.put("parameter", CollUtil.newArrayList(gameData.getHomeControl(),gameData.getHomeGoal(),gameData.getHomeShoot(),
                gameData.getHomeOntarget(),gameData.getHomePass(),gameData.getHomeOkpass(),gameData.getHomeSurpass(),
                gameData.getHomeOffside(),gameData.getHomeFoul(),gameData.getHomeYcard(),gameData.getHomeRcard()));
        return map;
    }

    @Override
    public Map<String, Object> getgamehomeattackdatamap(Map<String, Object> map, GameData gameData) {
        map.put("parameter", CollUtil.newArrayList(gameData.getHomeControl(),gameData.getHomeGoal(),gameData.getHomeShoot(),
                gameData.getHomeOntarget(),gameData.getHomeSurpass(),gameData.getHomeOffside(),gameData.getHomeFoul()
                ,gameData.getHomeYcard(),gameData.getHomeRcard()));
        return map;
    }

    @Override
    public Map<String, Object> getgamehomepassdatamap(Map<String, Object> map, GameData gameData) {
        map.put("parameter", CollUtil.newArrayList(gameData.getHomePass(),gameData.getHomeOkpass()));
        return map;
    }

    @Override
    public Map<String, Object> getgameawaydatamap(Map<String, Object> map, GameData gameData) {
        map.put("parameter", CollUtil.newArrayList(gameData.getAwayControl(),gameData.getAwayGoal(),gameData.getAwayShoot(),
                gameData.getAwayOntarget(),gameData.getAwayPass(),gameData.getAwayOkpass(),gameData.getAwaySurpass(),
                gameData.getAwayOffside(),gameData.getAwayFoul(),gameData.getAwayYcard(),gameData.getAwayRcard()));
        return map;
    }

    @Override
    public Map<String, Object> getgameawayattackdatamap(Map<String, Object> map, GameData gameData) {
        map.put("parameter", CollUtil.newArrayList(gameData.getAwayControl(),gameData.getAwayGoal(),gameData.getAwayShoot(),
                gameData.getAwayOntarget(),gameData.getAwaySurpass(),gameData.getAwayOffside(),gameData.getAwayFoul(),gameData.getAwayYcard(),gameData.getAwayRcard()));
        return map;
    }

    @Override
    public Map<String, Object> getgameawaypassdatamap(Map<String, Object> map, GameData gameData) {
        map.put("parameter", CollUtil.newArrayList(gameData.getAwayPass(),gameData.getAwayOkpass()));
        return map;
    }

}
